const express = require('express')

const db = require('../db')

const router = express.Router();


// --------------------------------------获取推荐列表--------------------------------
router.get('/get_recommend', (req, res) => {
    let sql = 'select * from  car_info left join order_list as b on car_info.car_id=b.car_id where (b.order_id is null) LIMIT 20'
    db(sql, (err, data) => {
        if (err) {
            throw err
        }
        res.send({
            code: 1,
            msg: '获取成功',
            data: data
        })
    })
})

module.exports=router